package com.cn.appcore.ext

import android.util.Base64
import androidx.core.content.ContextCompat
import com.cn.appcore.config.AppConfig


fun Int.asColor() = ContextCompat.getColor(AppConfig.getApplication(), this)

fun Int.asString() = AppConfig.getApplication().getString(this)

fun String.encodeToStr(): String = Base64.encodeToString(this.toByteArray(), Base64.NO_WRAP)

fun String.decodeToStr():String = String(Base64.decode(this,Base64.NO_WRAP))
